package com.csr.csrcheck.service.impl;

import com.csr.csrcheck.mapper.Product_apparatusMapper;
import com.csr.csrcheck.pojo.Product;
import com.csr.csrcheck.service.Product_apparatusService;
import com.csr.csrcheck.service.ex.ProductException;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class Product_apparatusServiceImpl implements Product_apparatusService {
    @Resource
    private Product_apparatusMapper product_apparatusMapper;

    public List<Product> getProductlistbyname(String product_name) {
        List<Product> list = this.product_apparatusMapper.getProductlistbyname(product_name);
        if (list == null)
            throw new ProductException("");
        return list;
    }
}

